import request from '@/utils/request'
import { getHost, getHeaderType } from '@/utils/host'
export function leftClass() {
  return request({
    method: 'get',
    url: '/user/webList/getWebList',
    baseURL: getHost(),
    headers: { 'Content-Type': 'application/json' }
  })
}

export function getWebList() {
  return request({
    method: 'get',
    url: '/user/webList/getWebList',
    baseURL: getHost(),
    headers: getHeaderType()
  })
}

export function getPageWebList(data) {
  return request({
    method: 'post',
    url: '/user/webList/getPageWebList',
    baseURL: getHost(),
    data: data,
    headers: getHeaderType()
  })
}

export function deleteById(id) {
  return request({
    method: 'post',
    url: '/user/webList/delWebList',
    baseURL: getHost(),
    params: { id: id },
    headers: getHeaderType()
  })
}

export function saveWebList(data) {
  return request({
    method: 'post',
    url: '/user/webList/saveWebList',
    baseURL: getHost(),
    data: data,
    headers: getHeaderType()
  })
}

export function getWebListById(id) {
  return request({
    method: 'get',
    url: '/user/webList/getWebListById',
    baseURL: getHost(),
    params: { id: id },
    headers: getHeaderType()
  })
}

export function updateWebList(data) {
  return request({
    method: 'post',
    url: '/user/webList/updateWebList',
    baseURL: getHost(),
    data: data,
    headers: getHeaderType()
  })
}
